import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class Passenger  {


	private String firstName;
	private String lastName;
	private Address address;
	private Date date;
	private TravelInsurance travelInsurance;
	private String passportNumber;
	
	Passenger()
	{
		
		firstName = null;
		lastName = null;
		address = null;
		travelInsurance = null;
			
	}
	

	
	 public void setFirstName(String fName) throws IllegalArgumentException
	{
		if (fName.length() > 30){
			
			throw new IllegalArgumentException();
		}
			
		else{
		firstName = fName;
		}
	}
	 
	 
	 public String getFirstName(){
		 
		 return firstName;
	 }
	 
	 public void setLastName(String lName){
		 
		 lastName = lName;
		 
	 }
	 
	 
	 public String getLastName(){
		 
		 return lastName;
	 }
	 
	 
	 public void setAddress(Address addressIn){
		 
		 
		 address = addressIn;
	 }
	 
	 
	 public Address getAddress(){
		 
		 return address;
	 }
	 

	 public void setTravelInsurance(TravelInsurance travelInsuranceIn){
		 
		 travelInsurance = travelInsuranceIn;
	 }
	 
	 
	 public TravelInsurance getTravelInsurance(){
		 
		 return travelInsurance;
	 }
	 
	 public void setPassportNumber(String passportNumberIn) throws IllegalArgumentException{
		 
		 if(passportNumberIn.length() > 9){
			 
			 throw new IllegalArgumentException();
		 }
		 
		 else{
		 passportNumber = passportNumberIn;
		 }
	 }
	 
	 public String getPassportNumber(){
		 
		 return passportNumber;
	 }
	 
	 public void setDate(Date date){
		 this.date = date;
	 }
	 
	 public Date getDate(){
		 
		 return this.date;
	 }


}
